import request from '../index'
import {IPage} from '../user/index'
interface ISourceData {
    Id?:string,
    name:string,
    purchase:string,
    verify:string,
    source:string,
    storage:string,
    provider:string
}

// 原料查询
export function getGoodSourceInfo(pageConfig:IPage,values:any) {
    return request({
        url:"good/source/info",
        data:{
            values,
            pageConfig
        }
    })
}

// 原料添加
export function addGoodSource(sourceData:ISourceData) {
    return request({
        url:"good/source/add",
        data:sourceData
    })
}
// 原料编辑
export function editGoodSource(sourceData:ISourceData) {
    return request({
        url:"good/source/edit",
        data:sourceData
    })
}
// 原料删除
export function deleteGoodSource(Id:number) {
    return request({
        url:"good/source/delete",
        data:{
            Id:Id
        }
    })
}